using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;

namespace RLFtrClc
{
    public partial class EditFighters : Form
    {
        public EditFighters()
        {
            InitializeComponent();
            FileStream fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + "/Data/Fighters.uds", FileMode.Open);
            ultraDataSource1.LoadFromXml(fs);
            fs.Close();
        }

        private void btnUpdate_Click(object sender, EventArgs e)
        {
            ugFighters.UpdateData();
            FileStream fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + "/Data/Fighters.uds", FileMode.Create);
            ultraDataSource1.SaveAsXml(fs);
            fs.Close();
        }

    }
}